const WangEditor = require('wangeditor');

module.exports = app => {
  app.wangEditor = {
    createEditor(selector, options = {}) {
      const editor = new WangEditor(`#${selector}`);
      Object.assign(editor.config, options);

      // 添加更多配置和自定义操作

      editor.create();
      return editor;
    }
  };
};